<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
 <link href="${pageContext.request.contextPath }/static/css/bootstrap.min.css" rel="stylesheet" type="text/css">
    <link href="${pageContext.request.contextPath }/static/css/bootstrap-table.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="${pageContext.request.contextPath }/static/css/base.css" />
    <link rel="stylesheet" href="${pageContext.request.contextPath }/static/css/info-mgt.css" />
    <style>
        .layui-layer-title{background:url(images/righttitlebig.png) repeat-x;font-weight:bold;color:#46647e; border:1px solid #c1d3de;height: 33px;line-height: 33px;}
        .tabe_bot label{width: 70px;text-align: right;font-size: 14px;font-weight: 900;color: #46647e}
        .l_left{float: left}
        .tabe_bot input,.tabe_bot  select{width: 170px;height: 30px;border-radius: 6px;margin:0 20px 0 0;border: none;border: 1px #ccc solid}
        .tabe_btn{width: 60px;height: 30px;background-color: #68b86c;border: none;border-radius: 6px;color: #fff}
    </style>
    <title>职员数据综合报表</title>
</head>


<body>
	
	<div class="query">
		<input id="creatime" style="display: none;" value="${time }">
    	<div class="tabe_bot">
        	<div class="l_left"><label>部门：</label><select id="oz_name">
        	<c:forEach var="y" items="${department}">
        		<option>${y.departement }</option>
        	</c:forEach> 
        	</select ></div>
			
        	<button class="tabe_btn " type="submit" onclick="One()">查询</button>
        	<div class="clear"></div>
    	</div>
	</div>
	
	<div class="table-box">
    	<table id="table" class="table_style"></table>
	</div>
	<div class="pagination ue-clear"></div>
</body>

<script type="text/javascript" src="${pageContext.request.contextPath }/static/js/jquery.js"></script>
<script src="${pageContext.request.contextPath }/static/js/bootstrap.min.js"></script>
<script src="${pageContext.request.contextPath }/static/js/bootstrap-table.js"></script>
<script src="${pageContext.request.contextPath }/static/js/bootstrap-table-zh-CN.min.js"></script>
<script src="${pageContext.request.contextPath }/static/js/date/js/laydate.js"></script>
<script src="${pageContext.request.contextPath }/static/js/layer_v2.1/layer/layer.js"></script>
<script type="text/javascript"></script>
<script>
    !function(){
        laydate.skin('molv');//切换皮肤，请查看skins下面皮肤库
        laydate({elem: '#demo'});//绑定元素
        laydate({elem: '#demo01'});//绑定元素
    }();
</script>

<script>
    $(function () {
    	var createtime = $('#creatime').val();
        $('#table').bootstrapTable({
            method: "get",
            striped: true,
            singleSelect: false,
            url: "../GetAllOncike_H.json", 
            dataType: "json",
            pagination: true, //分页
            pageSize: 10,
            pageNumber: 1,
            search: false, //显示搜索框
            contentType: "application/x-www-form-urlencoded",
            queryParams: function(params) {
				return{
					"createtime":createtime
				}
			},
            columns: [
                {
                    checkbox:"true",
                    field: 'ID',
                    align: 'center',
                    valign: 'middle'
                },
                {
                    title: "部门/学历",
                    field: 'departement',
                    align: 'center',
                    valign: 'middle'
                },
                {
                    title: "年份",
                    visible:false,
                    field: 'createtime',
                    align: 'center',
                    valign: 'middle'
                },
                {
                    title: "部门ID",
                    visible:false,
                    field: 'id',
                    align: 'center',
                    valign: 'middle'
                },
                {
                    title: '全部(人数)',
                    field: 'allcount',
                    align: 'center',
                    valign: 'middle',
                    formatter: function (value, row) {
                    		var all = '<a href="#" onclick=Hlayer('+row.createtime+','+row.id+')>'+value+'</a> '
                    		return all
                    }
                },
                {
                    title: '博士(人数)',
                    field: 'doctorcount',
                    align: 'center',
                    formatter: function (value, row) {
                    	var all = '<a href="#" onclick=getAll('+row.createtime+','+4+','+row.id+')>'+value+'</a>'
                		return all
                }
                },
                {
                    title: '硕士(人数)',
                    field: 'mastercount',
                    align: 'center',
                    valign: 'middle',
                    formatter: function (value, row) {
                    	var all = '<a href="#" onclick=getAll('+row.createtime+','+3+','+row.id+')>'+value+'</a>'
                		return all
                }
                },
                {
                    title: '本科(人数)',
                    field: 'regularcount',
                    align: 'center',
                    valign: 'middle',
                    formatter: function (value, row) {
                		var all = '<a href="#" onclick=getAll('+row.createtime+','+2+','+row.id+')>'+value+'</a>'
                		return all
                }
                },
                {
                    title: '专科(人数)',
                    field: 'juniorcount',
                    align: 'center',
                    formatter: function (value, row) {
                    	var all = '<a href="#" onclick=getAll('+row.createtime+','+1+','+row.id+')>'+value+'</a>'
                		return all
                }
                },
            ]
        });
    });
</script>
<script>
	function Hlayer(createtime,id) {
		var createtimes=createtime;
		var bmid = id; 
		layer.open({
	        type: 2,
	        title: '明细列表',
	        shade: 0.5,
	        skin: 'layui-layer-rim',
//	        maxmin: true,
	        closeBtn:1,
	        area: ['90%', '90%'],
	        shadeClose: true,
	        closeBtn: 1,
	        content: '../GetDetailNews.html/'+createtimes+','+id+''
	        //iframe的url
	    });
	}
	
	function getAll(createtime,educationsId,id) {
		var createtimes=createtime;//建档时间
		var educationsId = educationsId; //学历ID
		var id = id;//部门id
		layer.open({
	        type: 2,
	        title: '明细列表',
	        shade: 0.5,
	        skin: 'layui-layer-rim',
//	        maxmin: true,
	        closeBtn:1,
	        area: ['90%', '90%'],
	        shadeClose: true,
	        closeBtn: 1,
	        content: '../getDetailAlls.html/'+createtimes+','+educationsId+','+id+''
	        //iframe的url
	    });
	}
	
</script>
<script>
	
</script>
</html>